<!DOCTYPE html>
<html>
<head>
	<title>{:C('title')}</title>
	<meta charset='utf-8' />
	<meta name="viewport" content="width=device-width,initial-scale=1.0,maximum-scale=1.0,user-scalable=0" />
	<style>
		@media screen and (min-width:450px){
			body{width:450px;margin:0 auto;}
			.base_bottom{width:450px;margin:0 auto;}

			/*页面宽度900以下时 .abc的宽度为450*/
		}
		@media screen and (max-width:450px){
			body{width:95%;margin:0 auto;}
			.base_bottom{width:95%;margin:0 auto;}
			/*页面宽度900以下时 .abc的宽度为450*/
		}
		a{
			text-decoration:none;
		}
		select{
			appearance:none;-moz-appearance:none;-webkit-appearance:none;
		}
	</style>
	<script src='__PUBLIC__/Js/jquery.js'></script>
	<block name='head'></block>
</head>
<body style='background:#eee;border:0px solid'>

	<!--头部标题图片区-->
	<div style='height:40px;text-align:center;border:1px solid #ccc;font:normal bold 20px/40px normal'>	
		<block name='top'>
			{:C('title')}
		</block>
	</div><!--头部标题图片区结束-->

	
	<!--主内容-->
	<div style='border:1px solid #aaa;padding:5px;margin:5px 0'>
			<!--//搜索组件-文本框
					//控制器中设置类型
					$search_text = array(
						'0'=>'搜索类型',
						'1'=>'按标题',
						'2'=>'按内容',
					);
					$this->assign('search_text',$search_text);

					//视图中引用
					<includesxxx file='./Public/Template/Phone/Plugin/plugin_search_text.html' />	
			-->
			<div style='margin:0 0 10px 0;height:30px;border:0px solid;display:flex'>
				<div style='float:left;width:75px;line-height:30px;background:#8d8;border:0px solid #8d8;text-align:center'>
					<select id='search_text_type' style='cursor:pointer;height:100%;width:100%;border:0px;text-align:center;appearance:none;-moz-appearance:none;-webkit-appearance:none;'>
						<volist name='search_text' id='vo' item='key'>
							<option value='{$key}'>{$vo}</option>
						</volist>
						<option value='0'>不限</option>
					</select>
				</div>
				<div style='float:left;flex:1;border:1px solid #8d8'>
					<input name='search_text_content' style='height:100%;width:100%;border:0px' />
				</div>
				<div id='IndexMain_SearchButton' style='float:left;width:70px;line-height:30px;background:#8d8;text-align:center;cursor:pointer;'>
					搜索
				</div>
			</div>
			<script>
				$(function(){
					//信息搜索栏
					$('#IndexMain_SearchButton').click(function(){
						var SearchText_Type = $('#search_text_type').val();
						var SearchText_Cntent = $('input[name=search_text_content]').val().trim();

						sessionStorage.SearchText_Type = SearchText_Type;
						sessionStorage.SearchText_Cntent = SearchText_Cntent;
						//ClearSession();		//清除非搜索的条件缓存 (首页)
						Index_Init();		//初始化全部页面 (首页)
						alert(sessionStorage.SearchText_Type +'--'+ sessionStorage.SearchText_Cntent);
					});
					//如果有条件缓存
					if(sessionStorage.SearchText_Type){	
						//获取缓存
						var SearchText_TypeVal = sessionStorage.SearchText_Type;
						//遍历所有option
						for(var i=0;i<$('#search_text_type').get(0).options.length;i++){
							//获取每个option的value值 
							var SearchText_OptionVal = $('#search_text_type').get(0).options[i].value;
							//如果option的value值等于缓存
							if(SearchText_OptionVal == SearchText_TypeVal){
								//设置该下标的选项为默认
								$('#search_text_type').get(0).selectedIndex=i;
							}
						}
					}
					//如果有缓存文本，则保持状态
					if(sessionStorage.search_text_content){
						$('input[name=search_text_content]').val(sessionStorage.search_text_content);
					}

				});
			</script>
			<!--搜索组件-文本框 结束 -->


			
		<div id='Index_Main'>

		</div>
	</div><!--主内容 结束-->
	
	
	<!--底部导航-->
	<div style='position:fixed;bottom:0;left:0;width:100%;height:40px;text-align:center;line-height:40px;'>
		<div class='base_bottom' style='display:flex;border:0px solid #ccc;font-size:15px;background:#eee'>
			<block name='bottom'>
				<div style='flex:1'>
					<a href=''>首页</a>
				</div>
				<div style='flex:1'>
					<a href=''>发布信息</a>
				</div>
				<div style='flex:1'>
					<a href=''>我的信息</a>
				</div>
			</block>
		</div>
	</div>	<!--底部导航结束-->


</body>
</html>
<script>
	<block name='script'></block>
</script>